import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = { auth: true }

export default {
  path: '/measure',
  name: 'measure',
  meta,
  redirect: { name: 'measure-user' },
  component: layoutHeaderAside,
  children: [
    {
      path: 'receive',
      name: 'measure-receive',
      component: _import('measure/receive'),
      meta: {
        ...meta,
        title: '业务受理'
      }
    },
    {
      path: 'search',
      name: 'measure-search',
      component: _import('measure/search'),
      meta: {
        ...meta,
        title: '受理查询'
      }
    },
    {
      path: 'sample_move',
      name: 'measure-sample-move',
      component: _import('measure/sample_move'),
      meta: {
        ...meta,
        title: '样品流转'
      }
    },
    {
      path: 'sample_move_detail',
      name: 'measure-sample-move-detail',
      component: _import('measure/sample_move_detail'),
      meta: {
        ...meta,
        title: '样品流转详情'
      }
    },
    {
      path: 'room',
      name: 'measure-room',
      component: _import('measure/room'),
      meta: {
        ...meta,
        title: '房间条码'
      }
    },
    {
      path: 'task_assign',
      name: 'measure-task-assign',
      component: _import('measure/task_assign'),
      meta: {
        ...meta,
        title: '人员任务分配'
      }
    },
    {
      path: 'task_list',
      name: 'measure-task-list',
      component: _import('measure/task_list'),
      meta: {
        ...meta,
        title: '人员任务查看'
      }
    },
    {
      path: 'storage_in',
      name: 'measure-storage-in',
      component: _import('measure/storage_in'),
      meta: {
        ...meta,
        title: '综合入库'
      }
    },
    {
      path: 'storage_out',
      name: 'measure-storage-out',
      component: _import('measure/storage_out'),
      meta: {
        ...meta,
        title: '综合出库'
      }
    },
    {
      path: 'storage_search',
      name: 'measure-storage-search',
      component: _import('measure/storage_search'),
      meta: {
        ...meta,
        title: '库房查询'
      }
    },
    {
      path: 'reg_search',
      name: 'measure-reg-search',
      component: _import('measure/reg_search'),
      meta: {
        ...meta,
        title: '登记号查询'
      }
    },
    {
      path: 'unpackage_search',
      name: 'measure-unpackage-search',
      component: _import('measure/unpackage_search'),
      meta: {
        ...meta,
        title: '待分包查询'
      }
    },
    {
      path: 'package_search',
      name: 'measure-package-search',
      component: _import('measure/package_search'),
      meta: {
        ...meta,
        title: '分包查询'
      }
    },
    {
      path: 'package_storage',
      name: 'measure-package-storage',
      component: _import('measure/package_storage'),
      meta: {
        ...meta,
        title: '分包返库'
      }
    }
  ]
}
